#
# makefile for Packet Drivers for Turbo Make.  MS-Make may work.
#

ASM	=	tasm			# masm works.
LINK	=	tlink			# link may work.

# These are split into ASM and C files because you may not have Turbo C.
# If you don't, then remove the "c" dependency from the following:
all:	asm c

asm:	generic.com ni5210.com 3c501.com 3c503.com wd8003e.com ni5010.com \
	slip8250.com termin.com 3c523.com trace.com isolan.com chkpkt.com \
	trace.com

c:	stat.exe dump.exe

.asm.obj:
	$(ASM) $*;

stat.obj: stat.c
	tcc -mc -c stat

stat.exe: stat.obj
	tcc -mc -estat stat.obj

dump.obj: dump.c
	tcc -c dump

dump.exe: dump.obj
	tcc -edump dump.obj

termin.com: termin.obj
	$(LINK) termin
	exe2com termin
	del termin.exe

head.obj: head.asm defs.asm

ni5210.obj: ni5210.asm 82586.asm

ni5210.com: head.obj ni5210.obj tail.obj
	$(LINK) head ni5210 tail,ni5210/m
	exe2com ni5210
	del ni5210.exe

isolan.com: head.obj isolan.obj tail.obj
	$(LINK) head isolan tail,isolan/m
	exe2com isolan
	del isolan.exe

slip8250.com: head.obj slip8250.obj tail.obj
	$(LINK) head slip8250 tail,slip8250/m
	exe2com slip8250
	del slip8250.exe

ni5010.com: head.obj ni5010.obj tail.obj
	$(LINK) head ni5010 tail,ni5010/m
	exe2com ni5010
	del ni5010.exe

wd8003e.com: head.obj wd8003e.obj tail.obj
	$(LINK) head wd8003e tail,wd8003e/m
	exe2com wd8003e
	del wd8003e.exe

generic.com: head.obj generic.obj tail.obj
	$(LINK) head generic tail,generic/m
	exe2com generic
	del generic.exe

3c501.com: head.obj 3c501.obj tail.obj
	$(LINK) head 3c501 tail,3c501/m
	exe2com 3c501
	del 3c501.exe

3c503.com: head.obj 3c503.obj tail.obj
	$(LINK) head 3c503 tail,3c503/m
	exe2com 3c503
	del 3c503.exe

3c523.obj: 3c523.asm 82586.asm

3c523.com: head.obj 3c523.obj tail.obj
	$(LINK) head 3c523 tail,3c523/m
	exe2com 3c523
	del 3c523.exe

versions: nul
	grep -o "version.equ" *.asm
